﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
namespace IndexedList
{
    public interface IListIndex<T> where T : new()
    {
        string Name { get; set; }
        Dictionary<string, PropertyInfo> IndexFields { get; }

        void IndexItem(T data);
        void ClearIndexData();
        void RemoveIndex(T item);
        void IndexList(IEnumerable<T> indexedList);

        IEnumerable<T> FindItems(IList<object> values);
        T FindSingleItem(IList<object> values);

        IEnumerable<T> FindItems(T item);
        T FindSingleItem(T item);

        IEnumerable<T> FindItems(Dictionary<string, object> fieldValues);
        T FindSingleItem(Dictionary<string, object> fieldValues);
    }
}

